package com.java.star.mall.front.util;

/**
 * 脱敏工具类
 */
public class DesensitizationUtils {

    /**
     * 手机号脱敏
     *
     * @param phone 需要脱敏的手机号
     * @return 脱敏后的手机号
     */
    public static String desensitizationPhone(String phone) {
        StringBuilder sb = new StringBuilder(phone);
        sb.replace(4, 7, "****");
        return sb.toString();
    }
}
